﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common1.Master" AutoEventWireup="true" CodeBehind="frmAdminSy.aspx.cs" Inherits="WebApp3.frmAdminSy1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataKeyNames="Name" DataSourceID="SqlDataSource1" ForeColor="Black" PageSize="5" Width="615px">
        <Columns>
            <asp:TemplateField HeaderText="用户名">
                <ItemTemplate>
                    <table class="auto-style7">
                        <tr>
                            <td>
                                <asp:Image ID="Image5" runat="server" Height="40px" ImageUrl='<%# Eval("Picture", "~\\headImage\\{0}.gif") %>' Width="40px" />
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Name", "frmAdminGuanliuser.aspx?Name={0}") %>' Text='<%# Eval("Name", "{0}") %>'></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PassWord" HeaderText="密码" SortExpression="PassWord" />
            <asp:BoundField DataField="Sex" HeaderText="性别" SortExpression="Sex" />
            <asp:BoundField DataField="Createtime" HeaderText="注册时间" SortExpression="Createtime" />
            <asp:CommandField HeaderText="点击删除" ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
        <RowStyle BackColor="White" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <br />
    <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="点击对应的用户名可查看相应的用户的详细信息并进行修改"></asp:Label>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014112111ConnectionString %>" DeleteCommand="DELETE FROM [Register] WHERE [Name] = @Name" InsertCommand="INSERT INTO [Register] ([Name], [PassWord], [QqEmail], [Sex], [Createtime], [Picture], [gxqm]) VALUES (@Name, @PassWord, @QqEmail, @Sex, @Createtime, @Picture, @gxqm)" SelectCommand="SELECT * FROM [Register]" UpdateCommand="UPDATE [Register] SET [PassWord] = @PassWord, [QqEmail] = @QqEmail, [Sex] = @Sex, [Createtime] = @Createtime, [Picture] = @Picture, [gxqm] = @gxqm WHERE [Name] = @Name">
        <DeleteParameters>
            <asp:Parameter Name="Name" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="PassWord" Type="String" />
            <asp:Parameter Name="QqEmail" Type="String" />
            <asp:Parameter Name="Sex" Type="String" />
            <asp:Parameter Name="Createtime" Type="DateTime" />
            <asp:Parameter Name="Picture" Type="String" />
            <asp:Parameter Name="gxqm" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="PassWord" Type="String" />
            <asp:Parameter Name="QqEmail" Type="String" />
            <asp:Parameter Name="Sex" Type="String" />
            <asp:Parameter Name="Createtime" Type="DateTime" />
            <asp:Parameter Name="Picture" Type="String" />
            <asp:Parameter Name="gxqm" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
